//回顶部
$(document).ready(
		function() {
			var $backToTopTxt = "", $backToTopEle = $(
					'<div class="backToTop" title="回顶部"></div>').appendTo($("body")).text(
					$backToTopTxt).attr("title", $backToTopTxt).click(
					function() {
						$("html, body").animate({
							scrollTop : 0
						}, 120);
					}), $backToTopFun = function() {
				var st = $(document).scrollTop(), winh = $(window).height();
				(st > 0) ? $backToTopEle.show() : $backToTopEle.hide();
				// IE6下的定位
				if (!window.XMLHttpRequest) {
					$backToTopEle.css("top", st + winh - 166);
				}
			};
			$(window).bind("scroll", $backToTopFun);
			$(function() {
				$backToTopFun();
			});
});

/*首页公告滚动效果*/
var C = function() {
	var t, e = $('div[data-type="notice-list"]'),
	n = 3e3;
	e.hover(function() {
		clearInterval(t)
	},
	function() {
		t = setInterval(function() {
			var t = e.find("p:first"),
			n = t.height();
			t.animate({
				marginTop: -n + "px"
			},
			600,
			function() {
				t.css("marginTop", 0).appendTo(e)
			})
		},
		n)
	}).trigger("mouseleave")
};

C();
